package com.faklyn.bootelasticsearch.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author ronghl
 * @date 2021-01-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "timo_cloud_person_resume_v1.0.0")
public class EsResume implements Serializable {
    @Id
    @Field(type = FieldType.Long)
    private Long id;
    @Field(type = FieldType.Text)
    private String name;
    @Field(type = FieldType.Keyword)
    private String sex;
    @Field(type = FieldType.Keyword)
    private String identityNumber;
    @Field(type = FieldType.Long)
    private Long birthday;
    @Field(type = FieldType.Long)
    private Long createTime;
    @Field(type = FieldType.Long)
    private Long lastUpdateTime;
    @Field(type = FieldType.Keyword)
    private String country;
    @Field(type = FieldType.Keyword)
    private String regCity;
    @Field(type = FieldType.Keyword)
    private String liveCity;
    @Field(type = FieldType.Text)
    private String expectedWorkCity;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String college;
    @Field(type = FieldType.Text)
    private String field;
    @Field(type = FieldType.Keyword)
    private String degree;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String description;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String workExperience;
}
